
# -*- coding: utf-8 -*-
import os
import time
import allure

import pytest
import requests
from Common.adb_oper import kill_5D_IQI
from Common.basepage import BasePage
from PageObjects.Main_page import MainPage
from PageObjects.Player_page import PlayerPage
from Common.connect_to_device import d_one
from Common.handle_5D_log import FiveDLog
from Common.handle_log import do_log
from Common.handle_assert_events import assert_sequential_events_log, assert_exist_events_log

do_basepage = BasePage(device="d_one")
do_mainpage = MainPage(device="d_one")
do_playpage = PlayerPage(device="d_one")

def test_SeatShake_inter_01(self, handle_IQIYI):
    do_log.info("==========开始执行用例 {test_name}==========")
    collect_FiveD_log, log_filename = FiveDLog().create_5D_logger()
    do_log.info(f"本次采集的5D日志文件名为 {os.path.basename(log_filename)}")
    do_log.info(f"杀死5D和爱奇艺进程成功,清除缓存成功")
    do_mainpage.enter_film("哥斯拉大战金刚")
    time.sleep(8)
    do_playpage.seek_to_target("00:13:20")
    do_playpage.click_play()
    # time.sleep(10)
    # do_playpage.click_back()
    # time.sleep(10)
    # collect_FiveD_log.stop(timeout=3)
    # kill_5D_IQI()

